<style>
.item-btn{text-align:center;padding-bottom:15px;}
.item-sbtn{padding:15px 35px 30px 35px;}
.item-sbtn .layui-btn{float: right;}
.item-sbtn .layui-form-label{width:auto;padding-left:0;}
.oshare_info{border: 3px dashed #E6E6E6;display:block;padding:20px 0;text-align:center;font-size:12px;color:#666}
.oshare_info a{color:#1284f6;text-decoration:underline;padding-right:10px}
.upbm_not .upbm_label{color:#999}
.upbm_not .layui-input-block{display:none;}
</style>
<form class="layui-form layui-font14" name="order" action>
<div class='notes'>
  <li> <h3>小提示：</h3></li>
<li><b>1.</b>同意交易之前请确保联系方式真实性，若有误请修改；</li>
<li><b>2.</b>若产生交易纠纷速知站会与您联系沟通，多次无法与您取得联系，将评判为您的责任；</li> 
<li><b>3.</b>必须要确保您给出【交易周期】、【交易金额】已获得买家的认同并进行付款，否则无法开始交易；</li>
<li><b>3.</b>若您未按时（交易周期）按量（交易内容）完成服务并交付，一旦买家申请退款成功，您需要额外赔付买家消保赔付金（交易额的5%~10%）。</li>
</div>
<div class="layui-form-item">
<div class="my_info" style='width:90%;position:static;overflow:hidden;margin:0 5% 0 5%'>
<ul class="tit"><b>我的联系方式</b></ul>
<ul><b>ＱＱ：</b><div>{:sysconf('site_info_qq')}</div><a href='/member/setup/info' target="_blank">修改</a></ul>
<ul><b>电话：</b><div>{:sysconf('site_info_qq')}</div><a href='/member/verify/phone' target="_blank">修改</a></ul>
<ul><b>邮箱：</b><div>{:sysconf('site_info_qq')}2qq.com</div><a href='/member/verify/email' target="_blank">修改</a></ul>
</div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">交易周期</label>
    <div class="layui-inline"><input type="button" class="addred" value="-"><input type="text" name="hday" id="addred_num" data='day'  onkeyup="if(this.value<1 || this.value>60){layer.alert('交易周期，不能小于1天或大于60天',{icon:2});this.value=5;}"  class="p_number ly_num" value="1"><input type="button" class="addred" value="+"></div>
 <div class="layui-inline"><div class="layui-form-mid gray">天</div></div>

</div>

<div class="layui-form-item">
    <label class="layui-form-label">交易金额</label>
    <div class="layui-inline"><div class="layui-form-mid"> <b style='color:#ff6600' class='hmoney'>100</b> <span class='gray'>元</span> <a style='color:#666' onclick="layer.prompt({
  formType: 0,
  value: '',
  title: '<b>请输入您要改为的金额</b>'
}, function(value, index, elem){
var val=parseInt(value);
if(val>=10){
$('input[name=hmoney]').val(val);
$('.hmoney').html(val);
}else{
layer.msg('<b>交易金额不能小于<font color=#ff6600>10</font>元</b>', { skin: 'layui-layer-rim',icon:2});
}
layer.close(index);
});">【修改】</a></div></div>
</div>
<input type="hidden" name="hmoney" value="10">
<div class="layui-form-item item-btn">
    <input type="button" class="layui-btn layui-btn-danger" lay-submit="" lay-filter="main"  value="同意交易" />
</div>
<input type="hidden" name="layer" value="1">
<input type="hidden" name="role" value="sell">
<input type="hidden" name="utime" value="">
<input type="hidden" name="action" value="agree_deal">
<input type="hidden" name="number" value="{$data.number}"></form>
<script type="text/javascript">
var zindex=parent.layer.zIndex;//当前层INDEX
layer.title('<font color=red style="font-weight:700;font-size:14px;">同意交易</font>');
 layui.use('form', function(){
 var form = layui.form();
 form.verify({
	 	reason_txt: function(value) {
			if($.trim(value).length<10)  return '原因不能少于10个字！';
		}
});
form.on('submit(main)', function(data) {
	layer.load();
	dform(data.field,'order');
return false;
});

form.on('checkbox(upbm)',function(data){
		var $div=$(data.elem).closest(".layui-form-item");
		if(data.elem.checked){
			$div.removeClass("upbm_not");
			$('.layui-textarea').attr('placeholder','请说明修改退款金额原因，不能少于10个字！');
			$('.lay-submit').val('确认修改');
		}else{
			$div.addClass("upbm_not");
			$('.layui-textarea').attr('placeholder','请说明同意交易原因，不能少于10个字！');
			$('.lay-submit').val('确认补充');
		}
});

form.on('radio(backtype)',function(data){
		var $div=$(data.elem).closest(".layui-form-item").find('.backmoney_box');
		if(data.elem.value=='part'){
			$div.show();
		}else{
			$div.hide();
		}
});
form.on('radio(cashed_type)',function(data){
	    $('.layui-btn-cashed').val($(data.elem).data('title'));
	    $('.cashed_box').hide();
		$('.cashed_box_'+data.value).show();
});

form.on('select(main_reason)',function(data){
		$(data.elem).closest(".layui-form-item").find('.layui-form-mid').html(data.elem.value=='网盘失效'?'注：如果您不需要了，请在下方明确告知卖家不要再发货！':'');
});

	form.render(); //更新全部
$('.upbm_label').click(function(){$(this).prev().click();form.render('checkbox')});
});
 document.onkeydown = function(event) {
        var target, code, tag;
        if (!event) {
            event = window.event; //针对ie浏览器
            target = event.srcElement;
            code = event.keyCode;
            if (code == 13) {
                tag = target.tagName;
                if (tag == "TEXTAREA") { return true; }
                else { return false; }
            }
        }
        else {
            target = event.target; //针对遵循w3c标准的浏览器，如Firefox
            code = event.keyCode;
            if (code == 13) {
                tag = target.tagName;
                if (tag == "INPUT") { return false; }
                else { return true; }
            }
        }
    };
if(typeof revise_money == 'function') revise_money();
</script>